import request from "@/network/request";

export function list(page, size) {
    return request({
        url: '/business/course/list',
        params: {
            page: page,
            size: size,
        }
    })
}

export function categoryList(courseId) {
    return request({
        url: '/business/course/listCategory',
        params: {
            courseId
        }
    })
}

export function saveCourse(params) {
    return request({
        url: '/business/course/save',
        data: params
    })
}

export function deleteCourse(id) {
    return request({
        url: '/business/course/delete/' + id,
    })
}

export function getCourseContent(id) {
    return request({
        url: '/business/course/getCourseContent',
        params: {
            courseId: id
        }
    })
}

export function saveCourseContent(courseContent) {
    return request({
        url: '/business/course/saveCourseContent',
        data: courseContent
    })
}
